Class LabelPropagation

All Implemented Interfaces:
Processable<Graph,Graph>

public class LabelPropagation extends ClusteringAlgorithm
TODO: MAKE COMMENTS NICE abc
Author:
Adam
  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • generateRandomOrder

      public List<Node> generateRandomOrder(List<Node> allNodes)
      Makes a random order for LPA algorithm.
      Parameters:
      allNodes - is the list of nodes
      Returns:
      The a random order for node changing in the next iteration.
    • generateCommunityFromLabel

      private List<Node> generateCommunityFromLabel(int target, int[] labels, Graph graph)
      Performs FastGreedy community detection on a given Graph, returning the clustering with the maximum modularity.
      Parameters:
      target - the Graph to perform FastGreedy on
      labels - the Graph to perform FastGreedy on
      graph - the Graph to perform function on
      Returns:
      the list of Graphs representing the clustering with the maximum modularity
    • process

      public ArrayList<Graph> process(Graph graph)
      Performs Label Propagation (LPA) community detection on a given Graph, returning the significant communities present within a network.
      Parameters:
      graph - the Graph to perform LPA on
      Returns:
      the list of Graphs representing the significant partitioned clusters.